package br.com.winesys.geta.databinding.componentBinder;

import java.io.File;
import br.com.winesys.geta.databinding.ComponentBinder;
import br.com.winesys.geta.databinding.component.selector.FolderSelector;

public final class FolderSelectorBinder implements ComponentBinder<FolderSelector> {

	private static final ComponentBinder<FolderSelector> INSTANCE = new FolderSelectorBinder();

	public static ComponentBinder<FolderSelector> getInstance() {
		return INSTANCE;
	}

	private FolderSelectorBinder() {
	}

	@Override
	public Object read(FolderSelector component) {
		return component.getFile();
	}

	@Override
	public void write(FolderSelector component, Object value) {
		component.setFile((File) value);
	}
}
